package com.atguigu.gulimall.auth.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * SpringMVC配置
 *
 * @author DuGuanghan
 * @since 2024-08-16 10:39:06
 */
@Configuration
public class MyWebMvcConfig implements WebMvcConfigurer {
    /**
     * 实现视图映射
     *
     * @param registry 注册表
     * @author DuGuanghan
     * @since 2024-08-16 10:39:25
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/login.html").setViewName("index");
        registry.addViewController("/regist.html").setViewName("regist");
    }
}
